package com.girant.picture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.girant.picture.domain.dto.user.UserQueryReqDTO;
import com.girant.picture.domain.entity.User;
import com.girant.picture.domain.vo.LoginUserVO;
import com.girant.picture.domain.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 23364
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-10-05 22:16:50
*/
public interface UserService extends IService<User> {

    long userRegister(String userAccount,String userPassword,String checkPassword);

    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    public QueryWrapper<User> getQueryWrapper(UserQueryReqDTO userQueryRequest);

    User getLoginUser(HttpServletRequest request);
    /**
     * 获取加密后的密码
     */
    String getEncryptPassword(String userPassword);
    /**
     * 脱敏后的用户信息
     */
    public UserVO getUserVO(User user);
    /**
     * 脱敏后的用户列表
     */
    public List<UserVO> getUserListVO(List<User> userList);

    /**
     * 脱敏后的用户信息
     */
    LoginUserVO getLoginUserVO(User user);

    /**
     * 用户注销
     */
    boolean userLogout(HttpServletRequest request);
}
